<?php
require_once 'cls_Constant.php';

//Define some sort of service locator to attach...
class Locator implements iLocator
{
   protected $base;
  
   public function __construct($directory='.')
   {
		$this->base = (string) $directory;
   }
  
   public function canLocate($class)
   {
		$path = $this->getPath($class);
		if (file_exists($path)) return true;
		else return false;
   }
  
   public function getPath($class)
   {	
		return $this->base . Constant::SEPARADOR_DIRETORIO . $class . '.php';
   }
}
?>